package org.Niu.July8th.collectionTest.mapTest;

import lombok.AllArgsConstructor;

import java.util.Objects;

// 生成一个全参构造函数
@AllArgsConstructor
public class Person {
    String firstName;
    String lastName;
    int age;


    @Override
    public int hashCode() {
        // 防止空指针异常
        return Objects.hash(firstName,lastName,age);
    }
}
